The pointer
can be initialised using free memory. This
allows dynamic allocation of array memory. It is most useful for setting up
structures called linked lists. |
|
The final implication of
NULL is that if there is no more free memory, it is possible for the ptr
after being "new"-ed to point to NULL. Therefore, it is good
programming practice to check to ensure that the pointer points to something
before using it. Obviously, the program is unlikely to work without this
check. |